﻿<UserControl x:Class="IntegrationTool.Module.WriteToDynamicsCrm.Logging.RecordLogList.RecordLogListControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" d:DesignHeight="272" d:DesignWidth="547">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="180"/>
            <ColumnDefinition Width="100*"/>
            <ColumnDefinition Width="120"/>
            <ColumnDefinition Width="100*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="6*"/>
            <RowDefinition Height="24"/>
            <RowDefinition Height="8*"/>
            <RowDefinition Height="194*"/>
            <RowDefinition Height="7*"/>
            <RowDefinition Height="26*"/>
            <RowDefinition Height="7*"/>
        </Grid.RowDefinitions>
        <Label Content="Record-Details" Grid.Row="1"/>
        <Label Content="Filter:" Grid.Column="2" Grid.Row="1"/>
        <ComboBox Grid.Column="3" Grid.Row="1" >
            <ComboBoxItem Content="Show All" />
        </ComboBox>
        <DataGrid ItemsSource="{Binding}" RowHeaderWidth="0" AutoGenerateColumns="False" Grid.Row="3" Grid.ColumnSpan="4" SelectionUnit="Cell" SelectionMode="Single" >
            <DataGrid.Columns>
                <DataGridTextColumn IsReadOnly="True" Header="Record #" Binding="{Binding Path=RecordLogId}" />
                <DataGridTextColumn IsReadOnly="True" Header="Combined Key" Width="100" Binding="{Binding Path=CombinedBusinessKey}" />
                <DataGridTextColumn IsReadOnly="True" Header="Import Mode" Binding="{Binding Path=ImportMode}" />
                <DataGridTextColumn IsReadOnly="True" Header="Write Error" Width="1*" Binding="{Binding Path=WriteError}" ContextMenuService.IsEnabled="True">
                    <DataGridTextColumn.CellStyle>
                        <Style TargetType="DataGridCell">
                            <Setter Property="ToolTip" Value="{Binding WriteError}" />
                        </Style>
                    </DataGridTextColumn.CellStyle>

                </DataGridTextColumn>
            </DataGrid.Columns>
            
        </DataGrid>

    </Grid>
</UserControl>
